package com.ibeifeng.crm.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import com.ibeifeng.crm.bean.Salesman;
import com.ibeifeng.crm.dao.SalesmanDao;
import com.ibeifeng.crm.service.SalesmanService;
@Service
public class SalesmanServiceImpl implements SalesmanService {
	private Logger log = Logger.getLogger(SalesmanService.class);
	@Resource
	SalesmanDao salesmanDao;
	@Override
	public List<Salesman> query() {
		// TODO Auto-generated method stub
		return salesmanDao.query();
	}

	@Override
	public boolean delete(List<Integer> list) {
		// TODO Auto-generated method stub
		return salesmanDao.delete(list);
	}

	@Override
	public boolean update(Salesman sm) {
		// TODO Auto-generated method stub
		return salesmanDao.update(sm);
	}

	@Override
	public List<Salesman> mquery(int pg, int pgSize,String keyWord) {
		// TODO Auto-generated method stub
		return salesmanDao.mquery(pg,pgSize,keyWord);
	}

	@Override
	public boolean add(Salesman sm) {
		// TODO Auto-generated method stub
		return salesmanDao.add(sm);
	}

	@Override
	public int count() {
		
		return salesmanDao.getAllcount();
	}


}
